package com.shop.Control;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import com.shop.entity.User;
import com.shop.service.UserService;

@Component
@Scope("prototype")
public class TestAction extends SuperActionSupport {
	private static final long serialVersionUID = 7539369474585568995L;
	
	@Autowired
	UserService userServiceImpl;
	
	public String execute(){
		User u = new User();
		u.setUsername("xjx");
		System.out.println(userServiceImpl);
		userServiceImpl.save(u);
		System.out.println(com.opensymphony.xwork2.ActionContext.getContext().getParameters());
		print("true") ;
		return SUCCESS ;
	}
}
